# 复杂查询路由
from app.api import api_bp
from app.api.controllers.complex_query_controller import ComplexQueryController

# 基本过滤查询
@api_bp.route('/queries/basic-filtering', methods=['GET'])
def test_basic_filtering():
    """测试基本过滤查询"""
    return ComplexQueryController.test_basic_filtering()

# 逻辑运算符查询
@api_bp.route('/queries/logical-operators', methods=['GET'])
def test_logical_operators():
    """测试逻辑运算符查询"""
    return ComplexQueryController.test_logical_operators()

# 模式匹配查询
@api_bp.route('/queries/pattern-matching', methods=['GET'])
def test_pattern_matching():
    """测试模式匹配查询"""
    return ComplexQueryController.test_pattern_matching()

# 排序和限制查询
@api_bp.route('/queries/ordering-limiting', methods=['GET'])
def test_ordering_and_limiting():
    """测试排序和限制查询"""
    return ComplexQueryController.test_ordering_and_limiting()

# 聚合函数查询
@api_bp.route('/queries/aggregation', methods=['GET'])
def test_aggregation_functions():
    """测试聚合函数查询"""
    return ComplexQueryController.test_aggregation_functions()

# 日期和时间查询
@api_bp.route('/queries/date-time', methods=['GET'])
def test_date_and_time_queries():
    """测试日期和时间查询"""
    return ComplexQueryController.test_date_and_time_queries()

# 原生SQL查询
@api_bp.route('/queries/raw-sql', methods=['GET'])
def test_raw_sql_queries():
    """测试原生SQL查询"""
    return ComplexQueryController.test_raw_sql_queries()

# 子查询
@api_bp.route('/queries/subqueries', methods=['GET'])
def test_subqueries():
    """测试子查询"""
    return ComplexQueryController.test_subqueries()

# CASE语句
@api_bp.route('/queries/case-statements', methods=['GET'])
def test_case_statements():
    """测试CASE语句"""
    return ComplexQueryController.test_case_statements()

# UNION查询
@api_bp.route('/queries/union', methods=['GET'])
def test_union_queries():
    """测试UNION查询"""
    return ComplexQueryController.test_union_queries()

# 窗口函数
@api_bp.route('/queries/window-functions', methods=['GET'])
def test_window_functions():
    """测试窗口函数"""
    return ComplexQueryController.test_window_functions()

# 查询性能优化技巧
@api_bp.route('/queries/performance-tips', methods=['GET'])
def test_performance_tips():
    """测试查询性能优化技巧"""
    return ComplexQueryController.test_performance_tips()